package com.gexiaobao.pigeon.ui.adapter

import android.annotation.SuppressLint
import com.chad.library.adapter.base.BaseQuickAdapter
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.app.model.bean.ShopCarListResponse
import com.gexiaobao.pigeon.databinding.ItemShopCarCouponBinding

/**
 * @Author      : hxw
 * @Date        : 2023/6/28 14:58
 * @Describe    :
 */
class CouponShopCarAdapter(data: ArrayList<ShopCarListResponse.ListBean.ListGoodsBean.CouponList>) :
    BaseQuickAdapter<ShopCarListResponse.ListBean.ListGoodsBean.CouponList, DataBindBaseViewHolder>(R.layout.item_shop_car_coupon, data) {

    @SuppressLint("NotifyDataSetChanged")
    override fun convert(holder: DataBindBaseViewHolder, item: ShopCarListResponse.ListBean.ListGoodsBean.CouponList) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemShopCarCouponBinding
        binding.data = item
        binding.executePendingBindings()//防止列表抖动

    }
}